<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<div class="t_bar">
	绩效情况
</div>
<table id="eq_table1" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<col style="width:40%"/>
	<col style="width:60%"/>
	
	<tr>
	    <td colspan="2" align="center"><strong>上一年度绩效情况</strong></td>
	</tr>
	
	<tr>
	    <td>1.工作站实现产值（万元）</td>
	    <td align="center"><input type="text" name="proposal/chanzhi" label="1.工作站实现产值" class="input_css " onfocus="InitInput.setNumber(this,9,4,2);"
	   	    style="width:80%;text-align:right;" value="<x:out select="$xmlData/data/proposal/chanzhi" />" /></td>	    
	</tr>
		
	<tr>
	    <td>2.入驻各级科技特派员数量（个）</td>
	    <td align="center"><input type="text" name="proposal/tepaiyuan_num" label="2.入驻各级科技特派员数量" class="input_css " onfocus="InitInput.setNumber(this,9,0,0);"
	    	style="width:80%;text-align:right;" value="<x:out select="$xmlData/data/proposal/tepaiyuan_num" />" /></td>	    
	</tr>
		
	<tr>
	    <td>3.入驻各级科技特派员工作天数（天）</td>
	    <td align="center"><input type="text" name="proposal/work_date" label="3.入驻各级科技特派员工作天数" class="input_css " onfocus="InitInput.setNumber(this,9,0,0);" 
	        style="width:80%;text-align:right;" value="<x:out select="$xmlData/data/proposal/work_date" />" /></td>	    
	</tr>
		
	<tr>
	    <td>4.引进推广新技术（项）</td>
	    <td align="center"><input type="text" name="proposal/new_jishu" label="4.引进推广新技术" class="input_css " onfocus="InitInput.setNumber(this,9,0,0);" 
	        style="width:80%;text-align:right;" value="<x:out select="$xmlData/data/proposal/new_jishu" />" /></td>	    
	</tr>
		
	<tr>
	    <td>5.引进推广新品种（个）</td>
	    <td align="center"><input type="text" name="proposal/new_pingzhong" label="5.引进推广新品种" class="input_css " onfocus="InitInput.setNumber(this,9,0,0);" 
	        style="width:80%;text-align:right;" value="<x:out select="$xmlData/data/proposal/new_pingzhong" />" /></td>	    
	</tr>
		
	<tr>
	    <td>6.引进推广新装备（个）</td>
	    <td align="center"><input type="text" name="proposal/new_zhuangbei" label="6.引进推广新装备" class="input_css " onfocus="InitInput.setNumber(this,9,0,0);" 
	        style="width:80%;text-align:right;" value="<x:out select="$xmlData/data/proposal/new_zhuangbei" />" /></td>	    
	</tr>
		
	<tr>
	    <td>7.推广新技术（项）</td>
	    <td align="center"><input type="text" name="proposal/tuighang_jishu" label="7.推广新技术" class="input_css " onfocus="InitInput.setNumber(this,9,0,0);" 
	        style="width:80%;text-align:right;" value="<x:out select="$xmlData/data/proposal/tuighang_jishu" />" /></td>	    
	</tr>
		
	<tr>
	    <td>8.推广新品种示范数（亩）</td>
	    <td align="center"><input type="text" name="proposal/xpz_mianji" label="8.推广新品种示范数" class="input_css " onfocus="InitInput.setNumber(this,9,2,2);" 
	        style="width:80%;text-align:right;" value="<x:out select="$xmlData/data/proposal/xpz_mianji" />" /></td>	    
	</tr>
		
	<tr>
	    <td>9.建立种养殖示范基地（亩）</td>
	    <td align="center"><input type="text" name="proposal/yangzhi_jidi" label="9.建立种养殖示范基地" class="input_css " onfocus="InitInput.setNumber(this,9,2,2);" 
	        style="width:80%;text-align:right;" value="<x:out select="$xmlData/data/proposal/yangzhi_jidi" />" /></td>	    
	</tr>
		
	<tr>
	    <td>10.培训场次（次）</td>
	    <td align="center"><input type="text" name="proposal/peixun_num" label="10.培训场次" class="input_css " onfocus="InitInput.setNumber(this,9,0,0);" 
	        style="width:80%;text-align:right;" value="<x:out select="$xmlData/data/proposal/peixun_num" />" /></td>	    
	</tr>
		
	<tr>
	    <td>11.培训人数（人）</td>
	    <td align="center"><input type="text" name="proposal/peuxun_psn" label="11.培训人数" class="input_css " onfocus="InitInput.setNumber(this,9,0,0);" 
	        style="width:80%;text-align:right;" value="<x:out select="$xmlData/data/proposal/peuxun_psn" />" /></td>	    
	</tr>
		
	<tr>
	    <td>12.创业辅导人数（人）</td>
	    <td align="center"><input type="text" name="proposal/chuangye_num" label="12.创业辅导人数" class="input_css " onfocus="InitInput.setNumber(this,9,0,0);" 
	        style="width:80%;text-align:right;" value="<x:out select="$xmlData/data/proposal/chuangye_num" />" /></td>	    
	</tr>
		
	<tr>
	    <td>13.带动发展农户数（户）</td>
	    <td align="center"><input type="text" name="proposal/nonghu_num" label="13.带动发展农户数" class="input_css " onfocus="InitInput.setNumber(this,9,0,0);" 
	        style="width:80%;text-align:right;" value="<x:out select="$xmlData/data/proposal/nonghu_num" />" /></td>	    
	</tr>
		
	<tr>
	    <td>14.带动户均增收（元）</td>
	    <td align="center"><input type="text" name="proposal/daidong_shouru" label="14.带动户均增收" class="input_css " onfocus="InitInput.setNumber(this,9,2,2);" 
	        style="width:80%;text-align:right;" value="<x:out select="$xmlData/data/proposal/daidong_shouru" />" /></td>	    
	</tr>
		
	<tr>
	    <td style="height:250px">15.其它绩效情况：（限5000字）</td>
	    <td>
	    	<textarea name="proposal/jixiao_other" rows=16 style="width:98%;" class="input_textarea  maxlength:5000" label="15.其它绩效情况"><x:out select="$xmlData/data/proposal/jixiao_other"/></textarea>
			<input type="hidden" name="proposal/jixiao_other_hidden" id="project/jixiao_other_hidden" value="<x:out select="$xmlData/data/proposal/jixiao_other_hidden" />"/>
	    </td>	    
	</tr>
	
<table  id="tblMileStones1" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
		<tr>
			<td width="40%">绩效情况证明材料 （请以附件形式上传，上传附件格式为PDF格式）</td>
			
			<td width="50%" align="center" style="WORD-WRAP: break-word">
				<c:set var="file_code"><x:out select="$xmlData/data/contents/content/file_code" /></c:set>
				<div id="proof_content1" style=" float:left; width: 200px;"  >  	<%--  <c:if test="${empty file_code }">display:none;</c:if> --%>
					<div id="proof_file1" style="<c:if test="${empty file_code}">display:none;</c:if>">
					<input type="hidden" id="file_code1" name="contents/content/file_code" class="" label="" value="<x:out select="$xmlData/data/contents/content/file_code" />" />
					<a id="file_url1" class="link_x" href="/egrantweb/file/ajax-filedownload?fileCode=<x:out select="$xmlData/data/contents/content/file_code" />" style="cursor: pointer;">
					<span name="contents/content/file_name" id="file_name1" style="color: blue;"><x:out select="$xmlData/data/contents/content/file_name" /></span></a>
					<br/>(上传时间
						<span name="contents/content/file_date" id="file_date1">
							<iris:xout select="$xmlData/data/contents/content/file_date" />
						</span>
					)
					<a href="###" class="link_x" id="sy_delConent1" onclick="delContent_1('proof_file1',1)">删除</a>
					</div>
				</div>
			</td>
			<td width="10%"><input id="file1"   type="file" name="filedata" /></td>
		</tr>
	</table>



</table>
<br/><div>注：绩效情况需附相应证明材料。</div>

<script type="text/javascript">
	$(function(){
		changeCss();
		fileInit_1("tblMileStones1","PDF",null,"{'PDF':'20480'}");
		$("#tblMileStones1").find(".file").hide();
	});
	function changeCss() {
			$("table.t_css").each(function(){
				$(this).find("tr:even").removeClass().addClass("li_1");
				$(this).find("tr:odd").removeClass().addClass("li_2");
			});
			changeCss1("fundInfo","tblMileStones1");
		}
		function changeCss1(id1,id2) {
			if($("#"+id1+" tr:last").attr("class")=="li_1"){
				$("#"+id2+" tr").removeClass("li_1").addClass("li_2");
			}else{
				$("#"+id2+" tr").removeClass("li_2").addClass("li_1");
			}
		}
		
		
		
		function uploadfile(index,i){
			if(2==index){
				$("#proof_file_data").click();
				
			}
			else
			$("#card_file").click();
		}
		/* function show(index){
			$("#kepu").find("#proof_file"+index).show();
		} */
		function fileInit_1(tableId, type, width, validateJson) {
			 var imgres="";
			
			 if(locale=="en_US"){
			    imgres="Upload_EN.gif";
			    
			}else{
				imgres="Upload_2.gif";
				
			}
			$("#" + tableId).find(":file").filestyle({
				image : res + "/images/"+imgres,
				imageheight : 25,
				imagewidth : 56,
				width : width
			});  
			$("#" + tableId).find(":file").not("#filedata\\[0\\]").each(function(i) {
				$(this).change(function() {
					var str = $(this).attr("id");
					var index = str.charAt(str.length - 1);
					showFileName_1($(this), tableId, type, validateJson,index);
				});
			});
		}
		
		function showFileName_1(obj, tableId, type, validateJson,index) {
			var max = null;
			var fileTblId=null;// 文件列表的表格id

			fileTblId=tableId;
			var filedata = obj.val();
			if (filedata == '')
				return;
			else if(max!=null && $.isNumeric(max) && fileTblId!=null && $("#"+fileTblId+" tr:gt(1)").length>=max){
				var label="";
				if($("#"+fileTblId).attr("label")!=null)
					label=$("#"+fileTblId).attr("label");
				
				scmWarn(label+messageTip.canNotUploadMoreThan+max+messageTip.files1);
				return;
			} else {
				var fileName = filedata.substring(filedata.replace(/\\/g, '/')
						.lastIndexOf('/') + 1);
				var end = fileName.substring(fileName.lastIndexOf(".") + 1,
						fileName.length).toUpperCase();
				if (type.indexOf(end) < 0) {
					scmWarn(messageTip.pleaseUpload + type + messageTip.files2, "100px");
					return;
				}
			}

			$("#" + tableId + " .file").val(fileName);
			ajaxFileUpload_1(obj,"orgattach", tableId, type, max, validateJson,index);
		}
		
		function ajaxFileUpload_1(obj,type, tblId, filetype, max, validateJson,index) {
			irisAjaxFileUpload_1(obj,type, tblId, filetype, max, validateJson,index);
		}
		
		function uploadSuccess_1(obj,data, tableId, filetype,index){
			$("#"+tableId).find("#file_code"+index).val(data[data.length-1].fileCode);
			$("#"+tableId).find("#file_name"+index).text(data[data.length-1].fileName);
			$("#"+tableId).find("#file_url"+index).attr("href", downloadPath + data[data.length-1].fileCode);
			$("#proof_file"+index).show();
			$("#sy_delConent"+index).show();
			
/* 				var fileDate = $("#" + tableId).find("span[id='file_date'"+index+"]");// 上传时间对象
*/				
				var fileDate = $("#" + tableId).find("#file_date"+index);// 上传时间对象
				var nowTime = showLocale(new Date());
			fileDate.text(nowTime);
			$("#"+tableId).find("#"+index).show();
		}
		
		function irisAjaxFileUpload_1(obj,type, tableId, fileType, max, validateJson,index) {
			if (type == null || type == '') {
				scmWarn(messageTip.pleaseEnterTypeOfAttachment);
				return;
			}
			$("#"+tableId+" input[type='file']").not(obj).each(function(){
				this.outerHTML=this.outerHTML.replace(/(value=\").+\"/i,"$1\""); 
			});

			
			prcWin.openWin();// 打开遮罩层
			$.ajaxFileUpload({
				url : ctx + '/file/ajax-fileupload',// 请求地址
				secureuri : false,// 一般设置为false
				fileElementId : 'filedata',// 文件的id属性
				limitSize : '10',// 允许上传的文件大小,单位M
				allowType : 'PDF',// 允许上传的文件类型.
				data : {
					'type' : type,
					'validateJson':validateJson
				},
				tableId : tableId,// tableID
				dataType : 'json',// 返回值类型
				success : function(data, status) // 服务器成功响应处理函数
				{
					if (data.result == 'error') {
						scmWarn(data.msg);
					} else {
						
						uploadSuccess_1(obj,data, tableId, fileType,index);
						
						
						$("#"+tableId).find(":file").not("#filedata\\[0\\]").each(function(i) {
							fileType="PDF";
							validateJson="{'PDF':'20480'}";
							$(this).unbind("change");
							$(this).change(function() {
								var str = $(this).attr("id");
								var index = str.charAt(str.length - 1);
								 showFileName_1($(this), tableId, fileType, validateJson,index); 
							});
						});
					}
					prcWin.closeWin();// 关闭遮罩层
				},
				error : function(data, status, e)// 服务器响应失败处理函数
				{
					$("#"+tableId+" input[type='file']").each(function(j) {
						this.outerHTML=this.outerHTML.replace(/(value=\").+\"/i,"$1\""); 
					});
					

					$("#"+tableId).find(":file").not("#filedata\\[0\\]").each(function(i) {
						fileType="JPG，PNG，DOC，WPS，DOCX，PDF，XLS，XLSX，TIFF，RAR";
						validateJson="{'JPG':'20480','PNG':'20480','DOC':'20480','WPS':'20480','DOCX':'20480','PDF':'20480','XLS':'20480','XLSX':'20480','TIFF':'20480','RAR':'20480'}";
						$(this).unbind("change");
						$(this).change(function() {
							showFileName_1($(this), "mainGoodsInfo", fileType, validateJson,index);
						});
					});
					if (data && data.responseText && data.responseText.indexOf('413') > -1) {
				scmError("上传的文件超过限制大小！");
			} else {
				scmError(status);
			}
					prcWin.closeWin();// 关闭遮罩层
				},
				complete:function()
				{
					prcWin.closeWin();// 关闭遮罩层
				}
			});

		}
		
		
		function delContent_1(tableId,index) {
			if (confirm("你确定要删除该附件？")) {
				/* $("#" + tableId).find("input[id='file_code']").val("");// 清空文件名
				$("#" + tableId).find("span[id='file_date']").text("");// 清空文件code
				$("#" + tableId).find("span[id='file_name']").text("");// 清空文件上传日期
				$("#"+tableId).find("#proof_content").hide(); */
				
				$("#" + tableId).find("#file_code"+index).val("");// 清空文件名
				$("#" + tableId).find("#file_date"+index).text("");// 清空文件code
				$("#" + tableId).find("#file_name"+index).text("");// 清空文件上传日期
				$("#"+tableId).find("#proof_content"+index).hide();
				
				$("#sy_delConent"+index).hide();
				$("#file"+index).val("");
				$("#proof_file"+index).hide();
				
				/* $("#" + tableId).find("#proof_file"+index).hide(); */
				
			}
		}	
		
</script>